package com.huirui.server.generator;

import io.jsonwebtoken.Jwts;

import javax.crypto.SecretKey;
import java.util.Base64;

public class KeyGenerator {
    public static void main(String[] args) {
        // 生成HS512算法的密钥（512位）
        SecretKey MINI_PROGRAM_SECRET_KEY = Jwts.SIG.HS512.key().build();
        SecretKey ADMIN_SECRET_KEY = Jwts.SIG.HS512.key().build();
        System.out.println("小程序密钥:" + Base64.getEncoder().encodeToString(MINI_PROGRAM_SECRET_KEY.getEncoded()));
        System.out.println("后台管理系统密钥:" + Base64.getEncoder().encodeToString(ADMIN_SECRET_KEY.getEncoded()));
    }
}